package com.lzhsite.technology.designPattern.strategy.MailDemo;

public class MailServer
{
    private MailTemplate mail;

    public MailServer(MailTemplate mail)
    {
        this.mail = mail;
    }

    public void sendMail()
    {
        System.out.println("正在发送邮件信息");
        System.out.println("发件人：" + mail.getFrom());
        System.out.println("收件人" + mail.getTo());
        System.out.println("邮件标题：" + mail.getSubject());
        System.out.println("邮件内容：" + mail.getContext());
    }
}
